﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using facebook.Components;
using facebook.desktop;
using facebook.Forms;
using facebook.Schema;
using facebook.Types;
using facebook.Utility;
using Microsoft.Xml;

namespace PhotoMonkey
{
    public partial class FormPhotoAlbums : Form
    {
        FacebookService fbserv;
        user user;
        public FormPhotoAlbums(FacebookService fbserv,user usr)
        {
            this.fbserv = fbserv;
            user = usr;
            InitializeComponent();
        }

        private void FormPhotoAlbums_Load(object sender, EventArgs e)
        {
          try
            {
                if ((fbserv != null) || (user != null) || (fbserv.photos.getAlbums(user.uid) != null) || (user.uid!=null))
                {
                    photoAlbum.FacebookService = fbserv;
                    photoAlbum.Albums = fbserv.photos.getAlbums(user.uid);
                    this.Text = "Photos of " + user.name;

                }



           }
            catch (Exception ex)
            {
                Program.ErrorReport(ex);

            }
        }
        
        
    }
}
